//
//  WaterflowLayout.h
//  WaterFlowPractice
//
//  Created by mac on 16-5-17.
//  Copyright (c) 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>

#define ColloctionView_WIDTH self.collectionView.frame.size.width

static const CGFloat DefaultRowMargin = 10;
static const CGFloat DefaultColumnMargin = 10;
static const UIEdgeInsets DefaultEdgeInsets = {10,10,10,10};
static const int DefaultColumsCount = 2;

@class WaterflowLayout;
@protocol WaterflowDelegate <NSObject>

- (CGFloat)getCellHeightAtIndexPath:(NSIndexPath *)indexPath;

@end


@interface WaterflowLayout : UICollectionViewFlowLayout<UICollectionViewDelegateFlowLayout>

@property (nonatomic,strong)NSMutableArray *columsMaxY;

@property (nonatomic,strong)NSMutableArray *attrsArray;

@property (nonatomic,strong)id<WaterflowDelegate>delegate;

@end
